const { run } = require('runjs');
const { Command } = require('commander');
//const config = require('./config');
const program = new Command();
program
  .option('--name <type>', '对应build-package的name')
  .option('--serve', 'vue-cli-service serve')
  .option('--build', 'vue-cli-service build')
  .parse(process.argv);
  //console.log(config,`${config[program.name]}`, program.name, 'checkup value of name');
  if (!program.name) return console.error('未知的 --name');
  if (program.serve) {
    //return run('vue-cli-service serve');
    return run('vue-cli-service serve --mode dev.module ./alone/Observe/src/main.js');
  } else if (program.build) {
    return run('npm run lint && vue-cli-service build');
  }
  